package com.jishuo.nontax.bean.vo;

import com.jishuo.base.util.StringObject;
import com.jishuo.nontax.bean.bank.Student;
import com.jishuo.nontax.bean.message.SetStudent;
import lombok.Data;

import java.io.Serializable;
import java.math.BigDecimal;


/**
 * @author hlp
 * @email 1459875748@qq.com
 * @date 2023-02-02 10:13:13
 */
@Data
public class StudentVO implements Serializable {
    private static final long serialVersionUID = 1L;

    //id
    private Long studentid;
    //区划id
    private Long cantonid;
    //执收单位id
    private Long unitid;
    //学号
    private String studentnum;
    //班级
    private String classname;
    //学生名称
    private String studentname;
    //票据状态
    private int billstate;
    //缴款码
    private String payeraccount;
    //金额
    private BigDecimal funds;
    //收款银行id
    private Long bankid;
    //是否收款
    private int isbankaffirm;
    //交易流水号
    private String bankaffirm;
    //交易日期
    private String paybankdt;
    //
    private String writedate;
    //银行网点
    private String bankstation;
    //
    private Integer issend;
    //
    private Long messageid;
    //发送时间
    private String sendtime;
    //银行核心交易流水号
    private String hxbankaffirm;
    //账号
    private String accountcode;
    //区域编码
    private String cantoncode;
    //区域名称
    private String cantonname;
    //行政编码
    private String unitcode;
    //行政名称
    private String unitname;
    //账号名称
    private String accountname;
    //银行名称
    private String bankname;

    /**
     * 页面展示别名
     */
    private String payeebankname;
    private String payeeaccountname;
    private String payeeaccountcode;
    private String payeraccountcode;
    private  String billid;


    //返回Student 类
    public Student getStudent() {
        Student student = new Student();
        if (this.studentid != null) {
            student.setStudentid(StringObject.objectString(this.studentid));
        }
        student.setCantonid(StringObject.objectString(this.cantonid));
        student.setCantoncode(this.cantoncode);
        student.setCantonname(this.cantonname);
        student.setUnitid(StringObject.objectString(this.unitid));
        student.setUnitcode(this.unitcode);
        student.setUnitname(this.unitname);
        student.setStudentnum(this.studentnum);
        student.setClassname(this.classname);
        student.setStudentname(this.studentname);
        student.setBankid(StringObject.objectString(this.bankid));
        student.setAccountcode(this.accountcode);
        student.setAccountname(this.accountname);
        student.setFunds(StringObject.objectString(this.funds));
        student.setPayeraccount(this.payeraccount);
        student.setBillstate(StringObject.objectString(this.billstate));
        return student;
    }

    public StudentVO() {
    }

    //从SetStudent取数据
    public StudentVO(SetStudent student) {
        this.cantonid = Long.parseLong(student.getCantonid());
        this.unitid = Long.parseLong(student.getUnitid());
        this.studentnum = student.getStudentnum();
        this.classname = student.getClassname();
        this.studentname = student.getStudentname();
        this.bankid = Long.parseLong(student.getBankid());
        this.funds = new BigDecimal(student.getFund());
        this.payeraccount = student.getPayeraccount();
    }
}
